package com.xyz.business.service;

import java.sql.SQLException;
import java.util.List;

import com.xyz.business.bean.User;
import com.xyz.business.bean.query.UserForm;
import com.xyz.business.response.UserQueryResponse;

public interface UserService {
	// /**
	// * 添加用户
	// *
	// * @param user
	// * 用户信息
	// * @return 插入用户的返回结果
	// */
	// public UserAddResponse insert(User user);

	/**
	 * 查询用户信息
	 * 
	 * @param form
	 * @return
	 */
	public UserQueryResponse query(UserForm form);

	public int queryUserByName(String loginname) throws SQLException;

	public int login(User user) throws SQLException;

	public void insertUser(User user) throws SQLException;

	public List<User> query() throws SQLException;

	/**
	 * @param loginname
	 * @return
	 * @throws SQLException
	 */
	public User queryUser(String loginname) throws SQLException;

	/**
	 * 查询用户总数
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public int queryUserCount(User user) throws SQLException;

	/**
	 * 查询用户列表
	 * 
	 * @param user
	 * @param pageNow
	 * @param pageSize
	 * @return
	 * @throws SQLException
	 */
	public List<User> query(User user, int pageNow, int pageSize)
			throws SQLException;

	/**
	 * 根据用户id修改用户
	 * @param user
	 * @throws SQLException
	 */
	public int updateUser(User user) throws SQLException;

	public void hideUser(String uid) throws SQLException;
}
